// import './assets/main.css'
import './assets/less/index.less'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
// ui组件库（完整引入）
// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
// 持久化插件
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// 引入路由
import router from './router/index.js'

// 引入mock
import './api/mock.js'

import App from './App.vue'

// 注册icon图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// 全局封装的请求
import api from './api/api.js'

const app = createApp(App)


app.config.globalProperties.$api=api

// 注册icon图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)}
const pinia=createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
// app.use(ElementPlus)
app.mount('#app')
